<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html lang="en">
<head>
    <title>非生采购数据统计</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css">
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <link href="https://cdn.bootcss.com/fakeLoader.js/1.1.0/fakeLoader.min.css" rel="stylesheet">
</head>
<style>

    .personStyle{
        font-size:12px;
    }

</style>
<body>
<div class="container col-md-12">
    <h5 style="padding-top: 20px;"><code>非生项目数据视图 DataView</code></h5>
    <hr>
    <%--数据表--%>
    <div class="table-responsive-md" style="width:2000px;">
        <table class="table table-hover">
            <thead>
            <tr>
                <th scope="col" class="small">名称</th>
                <th scope="col" class="small">编号</th>
                <th scope="col" class="small">类别</th>
                <th scope="col" class="small">预算内</th>
                <th scope="col" class="small">发起人</th>
                <th scope="col" class="small">项目组长</th>
                <th scope="col" class="small">需求部门</th>
                <th scope="col" class="small">发起时间</th>
                <th scope="col" class="small">结束时间</th>
                <th scope="col" class="small">项目立项用时:</th>
                <th scope="col" class="small">方案评估用时:</th>
                <th scope="col" class="small">合同评审用时:</th>
                <th scope="col" class="small">验收实施用时:</th>
                <th scope="col" class="small">负责人</th>
                <th scope="col" class="small">阶段数据</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${projects}" var="project">
                <tr>
                    <td class="small" style="color:#1b7fff">
                        <c:if test="${project.runningInstanceId!=null && project.runningInstanceId!=''}">
                            <a target="_blank" href="../InstanceSheets.html?InstanceId=${project.runningInstanceId}">
                                    ${project.projectName}
                            </a>
                        </c:if>

                        <c:if test="${project.runningInstanceId==null || project.runningInstanceId==''}">
                            <a href="#">
                                    ${project.projectName}
                            </a>
                        </c:if>

                    </td>
                    <td class="small">${project.projectNumber}</td>
                    <td class="small">${project.projectType}</td>
                    <td class="small">${project.inBudget}</td>
                    <td class="small">${project.createdBy}</td>
                    <td class="small">${project.projectLeader}</td>
                    <td class="small">${project.parentPropertyName}</td>
                    <td class="small"> <fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${project.createdTime}"/> </td>
                    <c:if test="${project.modifiedTime!=null and project.modifiedTime!=''}">
                        <td class="small">
                            <fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${project.modifiedTime}"/>
                        </td>
                    </c:if>
                    <c:if test="${project.modifiedTime==null or project.modifiedTime==''}">
                        <td class="small">
                            未结束
                        </td>
                    </c:if>
                    <td class="small">${project.projectUseNeedDate} </td>
                    <td class="small">${project.projectUseAssessDate} </td>
                    <td class="small">${project.projectUseCheckDate} </td>
                    <td class="small">${project.projectUseTotalDate} </td>
                    <td class="small"><button type="button" onclick="getRelatedPerson('${project.getObjectID()}')" class="btn btn-outline-primary btn-sm" style="font-size: 12px">查看</button></td>
                    <td class="small"><button type="button" onclick="getProjectStage('${project.projectNumber}')" class="btn btn-outline-primary btn-sm" style="font-size: 12px">查看</button></td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>
</div>
<!-- PersonModal -->
<div class="modal fade" id="PersonModal" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="PersonModalTitle" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title small" id="PersonModalTitle">相关负责人</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col small">项目组长:
                        <span class="pl-2" id="projectLeader">

               </span>
                    </div>
                </div>
                <hr>
                <div class="row">
                    <div class="col small">技术评审负责人:
                        <span class="pl-2" id="technologyLeader">

               </span>
                    </div>
                </div>
                <hr>
                <div class="row">
                    <div class="col small">技术评审成员:
                        <span class="pl-2" id="technologyLeaderUser">

               </span>
                    </div>
                </div>
                <hr>
                <div class="row">
                    <div class="col small">商务评审负责人:
                        <span class="pl-2" id="businessLeader">

               </span>
                    </div>
                </div>
                <hr>
                <div class="row">
                    <div class="col small">商务评审成员:
                        <span class="pl-2" id="businessLeaderUser">

               </span>
                    </div>
                </div>
                <hr>
                <div class="row">
                    <div class="col small">运管委委员:
                        <span class="pl-2" id="operationManager">

               </span>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
                <%--<button type="button" class="btn btn-primary">Save changes</button>--%>
            </div>
        </div>
    </div>
</div>

<!-- ProjectStageDataModal -->
<div class="modal fade bd-example-modal-lg" id="ProjectStageDataModal" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="ProjectStageDataTitle" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title small" id="ProjectStageDataTitle">相关流程数据</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body" id="stageData">
                <ul class="nav nav-pills mb-3 pt-3" id="pills-tab" role="tablist">
                </ul>
                <div class="tab-content" id="pills-tabContent">
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
                <%--<button type="button" class="btn btn-primary">Save changes</button>--%>
            </div>
        </div>
    </div>
</div>

<%--
<div class="container shadow-sm" style="border-width: .2rem;border: solid #f8f9fa;margin-top:2%;border-radius: 10px;">
    <h5 style="padding-top: 20px;"><code>非生项目数据视图 DataView</code></h5>
    <hr>
    <form>
        <div class="form-group row">
            <label class="col-sm-2 pt-1" style="font-size: 14px;">请选择项目:</label>
            <div class="col-sm-8" >
                <select class="form-control form-control-sm" id="projectSelect">
                    <c:forEach items="${projects}" var="project">
                        <option value="${project.getRunningInstanceId()},${project.projectNumber}">${project.projectName}</option>
                    </c:forEach>
                </select>
            </div>
        </div>
    </form>

    &lt;%&ndash;当前项目进度&ndash;%&gt;
    <div class="row">
        <div class="col-md-2"><label style="font-size: 14px;">项目进度:</label></div>
        <div class="col-md-8 mb-3 pt-1">
            <div class="progress">
                <div id="projectProgress" class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" role="progressbar" style="width: 25%;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="50">
                    项目立项
                </div>
            </div>
        </div>
    </div>

</div>

&lt;%&ndash;项目信息&ndash;%&gt;
<div class="container pt-3 pb-3 shadow-sm" style="border-width: .2rem;border: solid #f8f9fa;margin-top:2%;border-radius: 10px;">
    <div class="alert alert-primary  small" role="alert">
        总项目数量:${fn:length(projects)}
    </div>
    <hr>

    <div class="row">
        <div class="col small">项目发起人:<span class="pl-2" id="createBy"></span></div>
        <div class="col small">项目发起时间:<span class="pl-2" style="color:red" id="projectCreateDate"></span></div>
    </div>
    <hr>
    <div class="row">
        <div class="col small">项目编号:<span class="pl-2" id="projectNumber"></span></div>
        <div class="col small">项目名称:<span class="pl-2" id="projectName"></span></div>
    </div>
    <hr>
    <div class="row">
        <div class="col small">项目类型:<span class="pl-2" id="projectType"></span></div>
        <div class="col small">是否预算内:<span class="pl-2" id="projectinBudget"></span></div>
    </div>
    <hr>

</div>


<div class="container mb-5 pb-3 shadow-sm" style="border-width: .2rem;border: solid #f8f9fa;margin-top:2%;border-radius: 10px;">
    &lt;%&ndash;<div class="d-flex align-items-center mt-2">
        <strong>Loading...</strong>
        <div class="spinner-border ml-auto" role="status" aria-hidden="true"></div>
    </div>&ndash;%&gt;
    <ul class="nav nav-pills mb-3 pt-3" id="pills-tab" role="tablist">
        <li class="nav-item">
            <a class="nav-link active small" id="pills-person-tab" data-toggle="pill" href="#pills-person" role="tab"
               aria-controls="pills-person" aria-selected="true">项目参与人</a>
        </li>
    </ul>
        <hr>
    <div class="tab-content" id="pills-tabContent">
        <div class="tab-pane fade show active pt-3" style="padding: 25px 20px" id="pills-person" role="tabpanel" aria-labelledby="pills-person-tab">
            <div class="row">
                <div class="col small">项目组长:
                    <span class="pl-2" id="projectLeader">

               </span>
                </div>
            </div>
            <hr>
            <div class="row">
                <div class="col small">技术评审负责人:
                    <span class="pl-2" id="technologyLeader">

               </span>
                </div>
            </div>
            <hr>
            <div class="row">
                <div class="col small">技术评审成员:
                    <span class="pl-2" id="technologyLeaderUser">

               </span>
                </div>
            </div>
            <hr>
            <div class="row">
                <div class="col small">商务评审负责人:
                    <span class="pl-2" id="businessLeader">

               </span>
                </div>
            </div>
            <hr>
            <div class="row">
                <div class="col small">商务评审成员:
                    <span class="pl-2" id="businessLeaderUser">

               </span>
                </div>
            </div>
            <hr>
            <div class="row">
                <div class="col small">运管委委员:
                    <span class="pl-2" id="operationManager">

               </span>
                </div>
            </div>
        </div>
    </div>
</div>


--%>

<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="../vendor/jquery/jquery.min.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js"></script>
<script src="https://cdn.bootcss.com/fakeLoader.js/1.1.0/fakeLoader.min.js"></script>
<script type="text/javascript" src="/Portal/kumhosunny/review/js/review_script.js"></script>
</body>
</html>
